package lab02.Text03;

/**
 * Created by 李晓容 on 2017/10/12.
 */
public class Student {
    //属性：计算机成绩、数学成绩、英语成绩
    float computerScore;
    float mathScoer;
    float englishScore;


    //行为:总分、平均分、最高分、最低分
    float sum(){
        return computerScore+mathScoer+englishScore;
    }
    float average(){
        return (computerScore+mathScoer+englishScore)/3;
    }
    float max(){
        float max=computerScore>mathScoer?computerScore:mathScoer;
        max=max>englishScore?max:englishScore;
        return max;
    }
    float min(){
        float min=computerScore<mathScoer?computerScore:mathScoer;
        min=min<englishScore?min:englishScore;
        return min;
    }
    void printStudent(){
        System.out.println("计算机成绩："+computerScore);
        System.out.println("数学成绩："+mathScoer);
        System.out.println("英语成绩："+englishScore);
        System.out.println("总分："+sum());
        System.out.println("平均分："+average());
        System.out.println("最高分:"+max());
        System.out.println("最低分:"+min());
    }

    public static void main(String[] args) {

    }


    //构造函数


    //main函数
}
